'use strict';
scenes.main = function() {
	let cameraMoveObject = new CameraMoveObject(main.camera);
	cvs.on('resize', e => netmap.size.set(cvs.size));
	
	let panel = new G.PanelList({
		pos: vec2(100, 100),
		padding: vec2(5, 5),
		gap: 5
	});
	
	let panel1d = new G.PanelExample({
		pos: vec2(0, 0),
		size: vec2(210, 70),
		
		background: '#333300',
		
		data: 'dkdk'
	});
	
	let panel2d = new G.PanelExample({
		pos: vec2(0, 0),
		size: vec2(210, 40),
		
		background: '#440044',
		
		data: 'dkldldk'
	});
	
	panel.appendChild(panel1d);
	panel.appendChild(panel2d);
	
	
	
	/*
	window.todoList = nodes.PanelViewFactory.create('list', {
		pos: vec2(100, 100),
		size: vec2(210, 120),
		
		padding: 5
	});
	
	todoList.addTask({
		title: 'git extends',
		description: 'sksk sldkkss'
	});
	
	todoList.addTask({
		title: 'git extends',
		description: 'sksk skkss'
	});*/
	
	
//===============updata===============//
	this.updata = function(dt) {
		let touchC = main.camera.buf(touch);
	//=======prePROCES=======//--vs--//=======EVENTS=======//
		cameraMoveObject.updata(touch, main.camera);
	//==================================================//
	
	
	//=======PROCES=======//--vs--//=======UPDATA=======//
		// ...;
	//==================================================//
	
	
	//==========DRAW==========//--vs--//==========RENDER==========//
		main.ctx.clearRect(0, 0, cvs.width, cvs.height);
		netmap.draw(main);
		
		panel.draw(main);
		
	//	todoList.draw(main);
	};	//==============================//
};